package org.example;

import org.antlr.runtime.*;

import java.io.IOException;

public class Test {
    public static void main(String[] args) throws IOException, RecognitionException {
        var input = new ANTLRFileStream(Tools.getResourcePath("/t.cymbol"));
        var lexer = new CymbolLexer(input);
        var tokens = new CommonTokenStream(lexer);
        var parser = new CymbolParser(tokens);
        var symbolTable = new SymbolTable();
        parser.compilationUnit(symbolTable);
        System.out.println(symbolTable.getScopeName() + ": " + symbolTable.symbols);
    }
}
